home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Higher Ed / G-M / MacPhaseExtras.sit / MacPhase Extras / MacPhase Macro Help.rsrc / TEXT_250_textoptions.txt < prev    next >
Encoding:
Text File  |  1994-07-30  |  1.2 KB  |  16 lines

  1. procedure TextOptions(readType : Str255; charsToSkip, linesToSkip : longint; eolAscii : integer; xDim : longint);
  2.  
  3. Sets the text reading options.  There are 4 ways in which text files can be read either:
  4. ‚Ä¢readType:="TEXTDATA"    < text numbers are read as elements of a data array>
  5. ‚Ä¢readType:="XYZ"        < text numbers are read as XYZ triplets and then converted to 2D data arrays>
  6. ‚Ä¢readType:="ZXY"        < text numbers are read as ZXY triplets and then converted to 2D data arrays>
  7. ‚Ä¢readType:="TEXT"    < text is read directly into a editable text window >
  8.  
  9. In all readType cases, any value found in charsToSkip and linesToSkip are used.  Where charsToSkip is bytes to offset from the start of the file and linesToSkip are the number of lines to skip.  Lines are defined as ASCII #13.  
  10.  
  11. The end of a line of data is found by either a certain ASCII value usually eolAscii:=13 (carrage return), or some other ASCII value.  If eolAscii:=-1, then the end of a line of data will be defined by reading of xDim number of data elements.
  12.  
  13. For Example:
  14.     TextOptions("TEXTDATA",10,5,-1,256);  Reads data which is made to have a width of 256.  Reading is offset into the file by 5lines+10bytes.
  15.  
  16. Also see:  OpenData  ReadBinaryOptions